package hcn.protocol.brandnew.dengji.guahao;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 门诊挂号信息查询-消息请求(ODS_02030003) - ODS_02030003
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "MsgBody")
@XmlAccessorType(XmlAccessType.FIELD)
public class GetMedicalregisterInfoRequest extends BaseRequest {

    /**
     * 患者基本信息
     */
    @XmlElement(name = "Patient")
    private Patient patient;
    /**
     * 门（急）诊挂号记录
     */
    @XmlElement(name = "OptRegister")
    private OptRegister optRegister;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Patient {

        /**
         * 就诊医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 业务系统患者档案类型
         */
        @XmlElement(name = "SourcePatientIdType")
        private String sourcePatientIdType;
        /**
         * 身份证件类别代码
         */
        @XmlElement(name = "IdCardCode")
        private String idCardCode;
        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 年龄
         */
        @XmlElement(name = "Age")
        private Short age;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class OptRegister {

        /**
         * 挂号流水号
         */
        @XmlElement(name = "OutRegistryId")
        private String outRegistryId;
        /**
         * 预约记录流水号
         */
        @XmlElement(name = "AppointsId")
        private String appointsId;
        /**
         * 就诊次数
         */
        @XmlElement(name = "VisitTimes")
        private Long visitTimes;
        /**
         * 患者类型代码
         */
        @XmlElement(name = "PatientType")
        private String patientType;
        /**
         * 就诊卡号
         */
        @XmlElement(name = "MedicalCardId")
        private String medicalCardId;
        /**
         * 就诊卡类别代码
         */
        @XmlElement(name = "MedicalCardType")
        private String medicalCardType;
        /**
         * 门（急）诊号
         */
        @XmlElement(name = "ClinicId")
        private String clinicId;
        /**
         * 挂号机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 挂号科室代码
         */
        @XmlElement(name = "RegisteredDept")
        private String registeredDept;
        /**
         * 挂号医师代码
         */
        @XmlElement(name = "RegisteredDcotor")
        private String registeredDcotor;
        /**
         * 起始挂号日期时间
         */
        @XmlElement(name = "RequestDateTime_B")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date requestDateTimeB;
        /**
         * 截止挂号日期时间
         */
        @XmlElement(name = "RequestDateTime_E")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date requestDateTimeE;
        /**
         * 挂号单据号
         */
        @XmlElement(name = "RegisteredNo")
        private String registeredNo;
        /**
         * 预约标志
         */
        @XmlElement(name = "IsAppoints")
        private String isAppoints;
        /**
         * 每页条数
         */
        @XmlElement(name = "PageSize")
        private Long pageSize;
        /**
         * 分页页数
         */
        @XmlElement(name = "PageNo")
        private Long pageNo;
        /**
         * 医生职称级别
         */
        @XmlElement(name = "DoctorMajorType")
        private String doctorMajorType;
        /**
         * 挂号科室名称
         */
        @XmlElement(name = "RegisteredDeptName")
        private String registeredDeptName;
        /**
         * 医疗机构组织机构名称
         */
        @XmlElement(name = "AuthorOrganizationName")
        private String authorOrganizationName;
        /**
         * 总计金额
         */
        @XmlElement(name = "TotalCost")
        private String totalCost;
        /**
         * 科室位置
         */
        @XmlElement(name = "DepartmentLocation")
        private String departmentLocation;
        /**
         * 分时段开始时间
         */
        @XmlElement(name = "DaypartingBeginDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date daypartingBeginDateTime;
        /**
         * 分时段结束时间
         */
        @XmlElement(name = "DaypartingEndDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date daypartingEndDateTime;
        /**
         * 排班日期时间
         */
        @XmlElement(name = "ScheduleDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date scheduleDateTime;
    }

}
